package com.jsoft.pds.view.beans.page;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;

import org.primefaces.context.RequestContext;
import org.primefaces.event.SelectEvent;
//import org.primefaces.showcase.domain.Car;
 
@ManagedBean(name = "dfView")
public class DFView {
     
    public void openPacDialog(int id) {
    	Map<String,Object> options = new HashMap<String, Object>();
    	options.put("modal", true);    	
        options.put("draggable", false);
        options.put("resizable", false);
        options.put("contentHeight", 460);
        options.put("contentWidth", 750);
    	
    	Map<String,List<String>> params = new HashMap<String,List<String>>();
    	List<String> list = new ArrayList<String>();
    	list.add(String.valueOf(id));
    	params.put("parametro", list);
    	
    	RequestContext.getCurrentInstance().openDialog("generalPac", options, params);  
    }
    
    public void openConDialog() {
    	Map<String,Object> options = new HashMap<String, Object>();
    	options.put("modal", true);    	
        options.put("draggable", false);
        options.put("resizable", false);
        options.put("contentHeight", 460);
        options.put("contentWidth", 750);
    	
    	
    	RequestContext.getCurrentInstance().openDialog("consultaPac", options, null);  
    } 
}
